﻿@model IEnumerable<JT.Domain.Detectability.MiddleTable>

@{
    ViewData["Title"] = "检测能力";
}



<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Ability.Id)
            </th>
            <th> @Html.DisplayNameFor(model => model.DetectionRange.Range)</th>

            <th>
                @Html.DisplayNameFor(model => model.Ability.Detectability)

            </th>
            <th>
                @Html.DisplayNameFor(model => model.StandardMethod.Method)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreateTime)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var AbilityId in Model.Select(s=>s.AbilityId).Distinct())
        {
            <tr>
                <td>
                    @AbilityId
                </td>
                <td>
                    @Model.Where(w=>w.AbilityId==AbilityId).FirstOrDefault().DetectionRange.Range
                </td>

                <td>
                    @Model.Where(w => w.AbilityId == AbilityId).FirstOrDefault().Ability.Detectability

                </td>
                <td>

                   @foreach (var i in Model.Where(W=>W.AbilityId==AbilityId))
                   {
                       @i.StandardMethod.Method
                   }

                </td>
                <td>
                    @Model.Where(w => w.AbilityId == AbilityId).FirstOrDefault().Ability.CreateTime

                </td>
                <td>
 
                    <a asp-action="Details" asp-route-id="@AbilityId">详情</a> 
                   
                </td>
            </tr>
        }
    </tbody>
</table>
